From: Ian Jackson Date: Fri, 25 Feb 2011 18:43:48 +0000 (+0000) Subject: xl: allow config filename to precede options X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10733 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=80ce9f75e5223dbfc95fcddb7139fc474043ca8e;p=xen.git xl: allow config filename to precede options "xm create" supports options which follow the domain config filename. So xl should do as well. This is an ad-hoc fixup to the "xl create" command line parser. We should revisit the xl command line parser in 4.2. Signed-off-by: Ian Jackson Reported-by: W. Michael Petullo Committed-by: Ian Jackson --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index fe136eeab6..2dd0f29e71 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3253,6 +3253,11 @@ int main_create(int argc, char **argv) {0, 0, 0, 0} }; + if (argv[1] && argv[1][0] != '-' && !strchr(argv[1], '=')) { + filename = argv[1]; + argc--; argv++; + } + while (1) { opt = getopt_long(argc, argv, "hnqf:pcde", long_options, &option_index); if (opt == -1)